/*
<!-- xswitch-->
<div class="item">xswitch
  <div class="xswitch">
    <input id="xswitch" type="checkbox" hidden="hidden"/>
    <label for="xswitch"></label>
  </div>
</div>
<!-- Checkbox-->
<div class="item">Checkbox
  <div class="checkbox">
    <input type="checkbox" name="checkbox" checked="checked"/>
    <input type="checkbox" name="checkbox"/>
  </div>
</div>
<!-- Radio-->
<div class="item">Radio
  <div class="radio">
    <label for="radio1">
      <input id="radio1" type="radio" name="radio" checked="checked"/><span class="outer"><span class="inner"></span></span>
    </label>
    <label for="radio2">
      <input id="radio2" type="radio" name="radio"/><span class="outer"><span class="inner"></span></span>
    </label>
  </div>
</div>

*/

.xswitch label {
  display: block;
  width: 44px;
  height: 16px;
  border-radius: 10px;
  background: rgba(189, 195, 199, 0.5);
  vertical-align: middle;
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-transition: background 350ms ease;
  transition: background 350ms ease;
}
.xswitch label:before, .xswitch label:after {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  -webkit-transition: all 120ms linear;
  transition: all 120ms linear;
}
.xswitch label:before {
  background: rgba(189, 195, 199, 0.07);
  -webkit-transform: translate3d(0, -50%, 0) scale(0);
          transform: translate3d(0, -50%, 0) scale(0);
}
.xswitch label:after {
  background: #bdc3c7;
  -webkit-transform: translate3d(0, -50%, 0);
          transform: translate3d(0, -50%, 0);
}
.xswitch input:checked + label {
  background: rgba(142, 68, 173, 0.6);
}
.xswitch input:checked + label:before {
  background: rgba(142, 68, 173, 0.07);
  -webkit-transform: translate3d(100%, -50%, 0) scale(1);
          transform: translate3d(100%, -50%, 0) scale(1);
}
.xswitch input:checked + label:after {
  background: #8e44ad;
  -webkit-transform: translate3d(100%, -50%, 0);
          transform: translate3d(100%, -50%, 0);
}

/* _______________________________________________________ */
.xswitch .checkbox input[type="checkbox"] {
  position: relative;
  margin: 0 10px;
}
.xswitch .checkbox input[type="checkbox"]:before {
  border: 2px solid transparent;
  content: "";
  cursor: pointer;
  display: block;
  height: 17px;
  position: absolute;
  -webkit-transition: all 200ms linear;
  transition: all 200ms linear;
  width: 17px;
  z-index: 1;
}
.xswitch .checkbox input[type="checkbox"]:checked:before {
  border-color: #8e44ad;
  border-top-style: none;
  border-right-style: none;
  height: 10px;
  -webkit-transform: rotate(-45deg);
          transform: rotate(-45deg);
}
.xswitch .checkbox input[type="checkbox"]:after {
  background: #FFFFFF;
  content: "";
  display: block;
  height: 17px;
  position: absolute;
  border: 2px solid rgba(189, 195, 199, 0.5);
  top: 0;
  width: 17px;
  z-index: 0;
}

/* _______________________________________________________ */
.xswitch .radio label {
  display: inline-block;
  cursor: pointer;
}
.xswitch .radio label:hover .inner {
  -webkit-transform: scale(0.5);
          transform: scale(0.5);
  opacity: 0.5;
}
.xswitch .radio label input {
  width: 1px;
  height: 1px;
  opacity: 0;
}
.xswitch .radio label input:checked + .outer .inner {
  -webkit-transform: scale(1);
          transform: scale(1);
  opacity: 1;
}
.xswitch .radio label input:checked + .outer {
  border: 3px solid #8e44ad;
}
.xswitch .radio label input:focus + .outer .inner {
  -webkit-transform: scale(1);
          transform: scale(1);
  opacity: 1;
  background-color: #8e44ad;
}
.xswitch .radio label .outer {
  width: 20px;
  height: 20px;
  display: block;
  float: left;
  margin: 0 5px;
  -webkit-transition: all 150ms linear;
  transition: all 150ms linear;
  border: 3px solid rgba(189, 195, 199, 0.5);
  border-radius: 50%;
  background-color: #fff;
}
.xswitch .radio label .outer .inner {
  -webkit-transition: all 150ms linear;
  transition: all 150ms linear;
  width: 14px;
  height: 14px;
  -webkit-transform: scale(0);
          transform: scale(0);
  display: block;
  margin: 3px;
  border-radius: 50%;
  background-color: #8e44ad;
  opacity: 0;
}

